package com.baizhi.video.controller;


import com.baizhi.model.entity.Category;
import com.baizhi.video.service.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 分类 前端控制器
 * </p>
 *
 * @author gange
 * @since 2023-07-18
 */
@RestController
@RequestMapping("/category")
public class CategoryController {
    @Autowired
    private ICategoryService categoryService;
    @GetMapping("/categories")
    public List<Category> selectCategoryTree(){
        return categoryService.selectCategoryTree();
    }


}

